﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;

namespace ERP.ERPSystem.ProductionSystem.Dto
{
    /// <summary>
    /// 生产系统-排班管理-排班计划
    /// </summary>
    public class ShiftplanningDTO : EntityDto<int>
    {
        /// <summary>
        /// 计划编号
        /// </summary>
        public string PlanNumber { get; set; }
        
        /// <summary>
        /// 计划名称
        /// </summary>
        [Required(ErrorMessage = "计划名称不能为空")]
        public string PlanName { get; set; }
        
        /// <summary>
        /// 开始日期
        /// </summary>
        [Required(ErrorMessage = "开始日期不能为空")]
        public DateTime StartTime { get; set; }
        
        /// <summary>
        /// 结束日期
        /// </summary>
        [Required(ErrorMessage = "结束日期不能为空")]
        public DateTime EndTime { get; set; }
        
        /// <summary>
        /// 班组类型
        /// </summary>
        [Required(ErrorMessage = "班组类型不能为空")]
        public string TeamType { get; set; }
        
        /// <summary>
        /// 轮班方式
        /// </summary>
        public string ShiftWay { get; set; }
        
        /// <summary>
        /// 倒班方式
        /// </summary>
        public string ProductionWay { get; set; }
        
        /// <summary>
        /// 单据状态
        /// </summary>
        public string DocumentStatus { get; set; } = "草稿";
        
        /// <summary>
        /// 备注
        /// </summary>
        public string Descr { get; set; }
    }

    /// <summary>
    /// 排班计划查询DTO
    /// </summary>
    public class ShiftplanningQueryDTO
    {
        public int Page { get; set; } = 1;
        public int Limit { get; set; } = 10;
        public string PlanNumber { get; set; }
        public string PlanName { get; set; }
        public string StartTime { get; set; }
        public string EndTime { get; set; }
        public string TeamType { get; set; }
    }

    /// <summary>
    /// 排班计划分页结果DTO
    /// </summary>
    public class ShiftplanningPageResultDTO
    {
        public int Code { get; set; }
        public string Msg { get; set; }
        public int Count { get; set; }
        public List<ShiftplanningDTO> Data { get; set; }
    }
}
